<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MdiWin</title>
    <uieip type="file" value="inc" src="/yqwin/easyui/include.txt" cache="true" minute="1440"></uieip>
    <uieip type="file" value="css" src="/yqwin/css/yqwin.min" cache="false"></uieip>
    <uieip type="file" value="js" src="/yqwin/data/yqwin.min" cache="false"></uieip>
</head>

<body>
    <script type="text/javascript">
        var $MidWin;

        function aaaa() {
            var $dg = $("<div></div>");


            $("body").append($dg);

            var $body;
            $dg.dialog({
                title: "ssss",
                width: 400,
                height: 300,
                closed: false,
                cache: false,
            });
        }

        function getBody() {

            return $("body");
        }

        $(function () {
            $("body").yqFormMdi({
                pwin: $(window),       //父项页面容器
                loadmenu: true,        //加载系统菜单
                appno: 1,

                topmenu_l: [],
                topmenu_r: [{
                    id: "m_index",
                    text: "首页",
                    iconCls: "yqwin-btn-icon fa fa-home",
                    onClick: function () {
                        window.location.href = "/";
                    }
                },
                $.yqFormMdi_fun("form_setup"),
                ],
                defleft: {
                    id: "tree",
                    title: "Tree",
                    openmore: false,
                    url: "/yqwin/demo/tree.html"
                },
                defedit: "/yqwin/demo/desktop.html",
                afterBindingTitle: function () {
                    // $("body").yqFormMdi("menuwin", {
                    //     id: "id1111",
                    //     title: '菜单1',
                    //     openmore: false,
                    //     url: "leftmenu.html"
                    // })

                    // $("body").yqFormMdi("editwin", {
                    //     id: "id2222",
                    //     title: 'Edit1',
                    //     openmore: false,
                    //     url: "edit.html"
                    // })

                    addedit();
                },
            });

            $MidWin = $("body");
        });


        function addmenu() {
            var ss = $MidWin.yqFormMdi("menuwin_get", "id1111");
            console.log(ss);
            if (ss != null) {
                ss.check();
            }
        }

        function addedit() {
            var ss = $MidWin.yqFormMdi("editwin_get", "id2222");
            console.log(ss);
            if (ss != null) {
                ss.check();
            }
        }
    </script>
</body>

</html>